From: Marco Trevisan (TreviƱo) Date: Fri, 21 Oct 2022 17:05:04 +0000 (+0200) Subject: gdm/util: Restart auth if default service changed X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~281^2~1^2~102 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=dc4f0f9053b0db3d064be5e8e74699a3cd11209f;p=gnome-shell.git gdm/util: Restart auth if default service changed If a default service changed while the previous one was active we need to reset the authentication so that we set back to the expected one. Part-of: --- diff --git a/js/gdm/util.js b/js/gdm/util.js index 9946b2c61..3ea91d2bb 100644 --- a/js/gdm/util.js +++ b/js/gdm/util.js @@ -519,6 +519,8 @@ export class ShellUserVerifier extends Signals.EventEmitter { } _updateDefaultService() { + const oldDefaultService = this._defaultService; + if (this._settings.get_boolean(PASSWORD_AUTHENTICATION_KEY)) this._defaultService = PASSWORD_SERVICE_NAME; else if (this._settings.get_boolean(SMARTCARD_AUTHENTICATION_KEY)) @@ -530,6 +532,11 @@ export class ShellUserVerifier extends Signals.EventEmitter { log('no authentication service is enabled, using password authentication'); this._defaultService = PASSWORD_SERVICE_NAME; } + + if (oldDefaultService && + oldDefaultService !== this._defaultService && + this._activeServices.has(oldDefaultService)) + this._cancelAndReset(); } async _startService(serviceName) {